package com.crazy.mybatis.gerenator.service.common;

public enum MethodEnum {

	UNKNOWN("unknown"),
	INSERT("insert"),
	INSERT_SELECTIVE("insertSelective"),
	UPDATE_BY_PRIMARY_KEY("updateByPrimaryKey"),
	UPDATE_BY_PRIMARY_KEY_SELECTIVE("updateByPrimaryKeySelective"),
	SELECT_BY_PRIMARY_KEY("selectByPrimaryKey");
	
	private String value;
	
	MethodEnum(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}
	
	public static MethodEnum findByValue(String value) {
		for (MethodEnum e : MethodEnum.values()) {
			if (e.getValue().equals(value)) {
				return e;
			}
		}
		return UNKNOWN;
	}
	
}
